<!DOCTYPE html>
<html lang="zh-cn">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
	<meta name="renderer" content="webkit">
	<title>{$WEB_TITLE}-{$L.2035}</title>
	<link rel="stylesheet" href="/public/pintuer.css">
	<link rel="stylesheet" href="/public/center.css">
	<script src="/public/jquery.js"></script>
	<script src="/public/pintuer.js"></script>
	<script src="/public/layer2.2/layer.js"></script>
	<style>
	body {
		background-color:#f7fafc;
	}
	</style>
</head>
<body>

<div class="login">
	<div class="container">
		<h1>{$L.2035}</h1>
		<h3>{$WEB_TITLE}</h3>
		<div class="form">
			<form action="" method="post" id="myform">
				<p><input type="text" class="input" name="username" placeholder="{$L.2008}" /></p>
				<p><input type="password" class="input" name="password" placeholder="{$L.2016}" /></p>
				<p>
				<input type="text" class="input input-auto" name="captcha"  placeholder="{$L.1211}" style="width:150px;" />
				<a href="javascript:;"><img src="" id="captcha" width="145" height="34" /></a>
				</p>
				<input type="hidden" name="_method" value="put" />
				<p><button class="button button-block bg-main text-big" id="mysubmit">{$L.2023}</button></p>
			</form>
		</div>
	</div>
</div>
<div class="index_copyright">
	<div class="container">
	<p>{$WEB_COPYRIGHT}</p>
	{if $WEB_ICP}<p>{$WEB_ICP}</p>{/if}
	</div>
</div>
<script>
$(function(){
	$("#mysubmit").click(function(){
		$("#myform").ajaxSubmit(function() {
			var ii = layer.load();
			$.post('',$("#myform").serialize(),function(d){
				layer.close(ii);
				if(d.status==1){
					window.location.href = '{U("/System/index")}';
				}else{
					layer.msg(d.msg);
					$("#captcha").attr("src",getCaptcha());
				}
			})
		})
		
		return false;
	})
	
	function getCaptcha()
	{
		var d = new Date()
		return '{U("/Index/captcha")}?'+d.getTime();
	}
	
	$("#captcha").attr("src",getCaptcha());
	
	$("#captcha").click(function(){
		$("#captcha").attr("src",getCaptcha());
	})
})
</script>
</body>
</html>